<template>
	<view>
		<view class="detail" v-for="(item,index) in list" :key="index" @click='togoGoodxq(item.id)'>
			<u--image :src="item.src" width="100%" height="375rpx" radius="10">
			</u--image>
			<view class="content">
				<text class="textcontent">{{item.name}}</text>
				<view class="money">
					<text class="textcontent">{{item.price}}</text>
					<text>元/m2</text>
				</view>
			</view>
			<view class="srccontent">
				<u-icon name='map-fill'></u-icon>
				<text>{{item.area}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		props: {
			list: {
				type: Array,
				Default: []
			},
		},
		name: "houseDetails",
		data() {
			return {
				// list: []
			};
		},

		methods: {
			togoGoodxq(i) {
				console.log(i);
				this.$api({
					url: `/lp/lpxq?id=${i}`,
					successCB: res => {
						console.log(res);
						uni.setStorageSync('lpxq', res)
						uni.navigateTo({
							url: `/pages/goodsxq/goodsxq?id=${i}`
						})
					}
				})
				// console.log(i);
			},

		}
	}
</script>

<style lang="less">
	.detail {
		margin: 30rpx auto;
	}

	.content {
		display: flex;
		justify-content: space-between;
		padding: 20rpx 30rpx;
		// margin-bottom: 50rpx;

		.textcontent {
			font-size: 36rpx;
			font-weight: bold;
		}
	}

	.srccontent {
		display: flex;
		padding: 0rpx 30rpx;
		color: #fcc;
		font-size: 24rpx;
	}
</style>
